﻿Imports Datos
Imports Entidad
Public Class OrdenesCompraNegocio

    Dim dao1 As New OrdenCompraDatos

    Function obtenerOrdenesCompraXFecha(fecha As String, flag1 As String, flag2 As String) As DataSet
        Return dao1.obtenerOrdenesCompraXFecha(fecha, flag1, flag2)
    End Function

    Function obtenerOrdenesCompraDetalleXOrdenAntes(codOrden As String) As DataSet
        Return dao1.obtenerOrdenesCompraDetalleXOrdenAntes(codOrden)
    End Function

    Function obtenerOrdenesCompraDetalleXOrdenDespues(codOrden As String) As DataSet
        Return dao1.obtenerOrdenesCompraDetalleXOrdenDespues(codOrden)
    End Function

    Function registrarOrdenesCompra(codOrden As String) As Boolean
        Return dao1.registrarOrdenesCompra(codOrden)
    End Function

    Function actualizarPIngresoFlagAlmacen(nroPar As String, flag As String, codOrden As String) As Boolean
        Return dao1.actualizarPIngresoFlagAlmacen(nroPar, flag, codOrden)
    End Function

    Function actualizarCantidadRealItem(codOrden As String, cantidad As Integer, codArticulo As String) As Boolean
        Return dao1.actualizarCantidadRealItem(codOrden, cantidad, codArticulo)
    End Function

    Function actualizarCantidadManoOrden(cantidad As Integer, codArticulo As String) As Boolean
        Return dao1.actualizarCantidadManoOrden(cantidad, codArticulo)
    End Function

    Function obtenerNroParteIngreso(cia As String, suc As String, tdoc As String, codOrden As String) As String
        Return dao1.obtenerNroParteIngreso(cia, suc, tdoc, codOrden)
    End Function

    Function actualizarCantidadesParteIngreso(cia As String, suc As String, tdo As String, dcaCodigo As String, dadCodigo As String, dadpCodigo As String, dadpuCodigo As String, artCodigo As String, cantidad As Integer) As Boolean
        Return dao1.actualizarCantidadesParteIngreso(cia, suc, tdo, dcaCodigo, dadCodigo, dadpCodigo, dadpuCodigo, artCodigo, cantidad)
    End Function

    Function obtenerOrdenCompra(codCIA As String, codSUC As String, codTDO As String, codDCP As String) As OrdenCompra
        Return dao1.obtenerOrdenCompra(codCIA, codSUC, codTDO, codDCP)
    End Function

    Function obtenerOrdenesCompraDetalle(codCIA As String, codSUC As String, codTDO As String, codDCP As String) As DataSet
        Return dao1.obtenerOrdenesCompraDetalle(codCIA, codSUC, codTDO, codDCP)
    End Function

    Function obtenerOrdenCompraDetalle(codCIA As String, codSUC As String, codTDO As String, codDCP As String, codArticulo As String) As DataSet
        Return dao1.obtenerOrdenCompraDetalle(codCIA, codSUC, codTDO, codDCP, codArticulo)
    End Function

    Function obtenerCodigoAutogeneradoDetalle(codTDO As String, codDCP As String) As String
        Return dao1.obtenerCodigoAutogeneradoDetalle(codTDO, codDCP)
    End Function

    Function registrarOrdenCompraDetalle(codCIA As String, codSUC As String, codTDO As String, codDCP As String, codDPD As String, codArticulo As String, costo As String, cantidad As String, activo As String) As Boolean
        Return dao1.registrarOrdenCompraDetalle(codCIA, codSUC, codTDO, codDCP, codDPD, codArticulo, costo, cantidad, activo)
    End Function

    Function actualizarOrdenCompraDetalle(codCIA As String, codSUC As String, codTDO As String, codDCP As String, codArticulo1 As String, codArticulo2 As String, cantidad As String) As Boolean
        Return dao1.actualizarOrdenCompraDetalle(codCIA, codSUC, codTDO, codDCP, codArticulo1, codArticulo2, cantidad)
    End Function

End Class